package com.x.erp.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.x.erp.model.CarAge;
import com.x.erp.rpc.CarAgeRpcService;
import com.x.framework.controller.BaseController;
import com.x.framework.controller.ResultCode;
import com.x.framework.controller.ResultModel;

/**
 * 车龄区间Controller
 * 
 * @author pansong
 */
@RestController
@RequestMapping(value = "/carAge")
public class CarAgeController extends BaseController {

	@Reference
	private CarAgeRpcService carAgeRpcService;// 车龄区间服务

	/**
	 * 查询车龄区间列表
	 * 
	 * @param carAge
	 * @return
	 */
	@RequestMapping(value = "/getCarAgeList", method = { RequestMethod.POST, RequestMethod.GET })
	public ResultModel getCarAgeList(CarAge carAge) {
		return new ResultModel(ResultCode.RESULT_SUCCESS, "查询成功", carAgeRpcService.selectCarAgeList(carAge));
	}
}
